home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / GameboyDev / GBDK / lib / strcat.c < prev    next >
C/C++ Source or Header  |  1999-03-29  |  245b  |  20 lines

  1. #include <string.h>
  2.  
  3. /*
  4.  * Concatenate s2 on the end of s1. s1 must be large enough.
  5.  * Return s1.
  6.  */
  7.  
  8. char *strcat(char *s1, const char *s2)
  9. {
  10.   char *os1;
  11.  
  12.   os1 = s1;
  13.   while(*s1++)
  14.     ;
  15.   --s1;
  16.   while(*s1++ = *s2++)
  17.     ;
  18.   return os1;
  19. }
  20.